#include "iostream"
#include "string"
#include "vector"
using namespace std;
int main(void)
{
    vector<int> ivec;
    int xiaohong_height;
    int temp; // 临时变量
    for (int i = 0; i < 10; i++)
    {
        cin >> temp;
        ivec.push_back(temp);
    }
    cin >> xiaohong_height;
    int desk_height = 30;
    int apple_cout = 0;
    for (auto c : ivec)
    {
        if (xiaohong_height >= c || xiaohong_height + desk_height >= c)
        {
            apple_cout++;
        }
    }
    cout << apple_cout;
}